<template>
    <div class='box'>
        <web-view :src='weburl'
                  @load='webload'
                  @error='weberror'
                  @message='webmessage'></web-view>
    </div>
</template>

<script>
export default {
    data() {
        return {
            weburl: ''
        }
    },
    onLoad(option) {
        if (option.vurl) {
			if(option.uid) {
				this.weburl = unescape(option.vurl) + '?uid=' + option.uid;
			}else {
				this.weburl = unescape(option.vurl)
			}
			console.log(this.weburl)
        }
    },
    methods: {
        webload(e) {
            console.log('webview加载成功', e)
        },
        weberror(e) {
            console.error('webview加载失败', e)
        },
        webmessage(e) {
            console.log('webview post message', e)
        }
    }

}
</script>
<style>
page {
    height: 100%;
}
</style>
<style scoped lang="scss">
.box {
    min-height: 100%;
}
</style>
